package com.gzucm.Scholarship.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class LogUtil {

    public static void info(String s, Object... objs) {
        log.info(s, objs);
    }

    public static void warn(String s, Object... objs) {
        log.warn(s, objs);
    }

    public static void error(String s, Object... objs) {
        log.error(s, objs);
    }

    public static void log(String s, Object... objs) {
        if (log.isDebugEnabled()) {
            log.debug(s, objs);
        } else if (log.isTraceEnabled()) {
            log.trace(s, objs);
        } else if (log.isInfoEnabled()) {
            log.info(s, objs);
        } else if (log.isWarnEnabled()) {
            log.warn(s, objs);
        } else if (log.isErrorEnabled()) {
            log.error(s, objs);
        }
    }

}
